##===----------------------------------------------------------------------===##
##
## This source file is part of the Swift open source project
##
## Copyright (c) 2024 Apple Inc. and the Swift project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
## See CONTRIBUTORS.md for the list of Swift project authors
##
## SPDX-License-Identifier: Apache-2.0
##
##===----------------------------------------------------------------------===##

set(SWIFT_FOUNDATION_EXPORTS_FILE ${CMAKE_CURRENT_BINARY_DIR}/SwiftFoundationExports.cmake)
set(SWIFT_FOUNDATION_ICU_EXPORTS_FILE ${SwiftFoundationICU_BINARY_DIR}/cmake/modules/SwiftFoundationICUExports.cmake)
set(SWIFT_COLLECTIONS_EXPORTS_FILE ${SwiftCollections_BINARY_DIR}/cmake/modules/SwiftCollectionsExports.cmake)

configure_file(SwiftFoundationConfig.cmake.in
    ${CMAKE_CURRENT_BINARY_DIR}/SwiftFoundationConfig.cmake)

get_property(SWIFT_FOUNDATION_EXPORTS GLOBAL PROPERTY SWIFT_FOUNDATION_EXPORTS)
export(TARGETS ${SWIFT_FOUNDATION_EXPORTS}
    NAMESPACE SwiftFoundation::
    FILE ${SWIFT_FOUNDATION_EXPORTS_FILE}
    EXPORT_LINK_INTERFACE_LIBRARIES)
